<template>
  <div class="inputCtx">
    <el-input
      v-model="value"
      placeholder="请输入内容"
      v-bind="$attrs"
    ></el-input>
    <el-button @click="clearClick" style="margin-left: 10px">清除</el-button>
    <el-button @click="confirmClick">确认</el-button>
  </div>
</template>

<script>
import mixins from "./mixins.js";
export default {
  mixins: [mixins],
  data() {
    return {
      value: "",
    };
  },
  methods: {
    clearClick() {
      this.value = "";
      this.updateValue();
    },
    confirmClick() {
      this.updateFilter(this.value);
      this.updateValue(this.value);
      this.closePopover();
    },
  },
};
</script>

<style scoped lang="less">
.inputCtx {
  display: flex;
}
</style>
